﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/Manager.master" AutoEventWireup="true"
    CodeFile="ManagementBrand.aspx.cs" Inherits="EShop_ManagementBrand" Title="Quản Lý Thương Hiệu" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <%--<link href="<%= ResolveUrl("~/Styles/themes/base/ui.all.css")%>" rel="stylesheet"
        type="text/css" />--%>
    <%--<script src="<%= ResolveUrl("~/Scripts/ui.core.js")%>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/Scripts/ui.accordion.js")%>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/Scripts/ui.datepicker.js")%>" type="text/javascript"></script>--%>
    <script type="text/javascript">
        jQuery(function () {
            jQuery("#<%= txtDateView.ClientID %>").datepicker({ dateFormat: "dd/mm/yy" });
        });
        function isValidDate() {
            try {
                var date_value = document.getElementById("<%=txtDateView.ClientID %>").value;
                jQuery.datepicker.parseDate("dd/mm/yy", date_value, null);
            }
            catch (error) {
                alert("Ngày nhập vào không đúng định dạng.");
                return false;
            }
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="content_area1">
        <h2>
            Quản Lý Thương Hiệu</h2>
        <div style="padding-left: 10px;">
            <div class="rows" id="divCurrentPoint" runat="server">
                <div style="padding-left: 20px;">
                    Chọn ngày:
                    <asp:TextBox ID="txtDateView" runat="server"></asp:TextBox>
                    <asp:Button ID="btnView" runat="server" Text="Xem" CssClass="buttonDefault form-submit"  OnClientClick="return isValidDate()"
                        OnClick="btnView_Click" />
                </div>
            </div>
            <br class="clear" />
            <div class="rows" id="divRank" runat="server">
                <div style="margin-left: 20px; color: #0278b8;">
                    <asp:Label ID="lblMessage" runat="server" Visible="false"></asp:Label></div>
                <asp:Repeater ID="rptBrand" runat="server">
                    <HeaderTemplate>
                        <table id="bannerList" style="margin-left: 8px; width: 95%;">
                            <tr>
                                <th>
                                    STT
                                </th>
                                <th>
                                    Tên Thương Hiệu
                                </th>
                                <th>
                                    Loại Thương Hiệu
                                </th>
                                <th>
                                    Điện Thoại
                                </th>
                                <th>
                                    Di Động
                                </th>
                                <th>
                                    Email
                                </th>
                                <th>
                                    Logo
                                </th>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td align="center">
                                <%# Container.ItemIndex+1 %>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "name")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "category_job")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "phone")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "mobile")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "email")%>
                            </td>
                            <td>
                                <%--<img src="../uploads/111230115252_ap_20091128092921581.jpg" alt='' width="70px" height="70px" />--%>
                                <%# DataBinder.Eval(Container.DataItem, "logo").ToString() !=string.Empty  ? string.Format("<img src='../uploads/{0}' alt='' width='70px' height='70px' />",DataBinder.Eval(Container.DataItem, "logo")) : string.Empty %>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
            </div>
            <br class="clear" />
        </div>
        <br class="clear" />
        <img src="<%= ResolveUrl("~/images/bottom.jpg")%>" align="absbottom" alt="" />
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
</asp:Content>
